/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.plt.beans;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.swing.JOptionPane;


public class AbstractController {

    public AbstractController() {
    }

    public static void mostrarError(String msg) {
        JOptionPane.showMessageDialog(null, msg);
        FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error", msg);
        FacesContext.getCurrentInstance().addMessage("Error", fm);
    }

    public static void mostrarInfo(String msg) {
        FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_INFO, "Exito", msg);
        FacesContext.getCurrentInstance().addMessage("Exito", fm);
    }

}